package models;

import java.util.ArrayList;
import java.util.List;

import parser.generic.Node;

public class Items extends Node {

	private List<Item> items;

	public Items() {
		items = new ArrayList<Item>();
	}

	public void addItem(Item data) {
		items.add(data);
	}

	@Override
	public String toString() {
		String out = "";

		for (Item i : items)
			out += i + ", ";

		return out.substring(0, out.length() - 2);
	}

	public String getTyped(String type) {
		String out = "";

		for (Item i : items)
			out += i.getTyped(type) + ", ";

		return out.substring(0, out.length() - 2);
	}
}
